package com.tpay.client.view;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Widget;
import com.gwtplatform.mvp.client.ViewWithUiHandlers;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
import com.tpay.client.presenter.MainPagePresenter;
import com.tpay.client.uihandlers.MainPageUiHandlers;

public class MainPageView extends ViewWithUiHandlers<MainPageUiHandlers> implements MainPagePresenter.MyView {
	public static final int TOP_HEIGHT = 100;
	public static final int MENU_HEIGHT = 100;
	public static final int BOTTOM_HEIGHT = 100;
	
	private final VLayout layout;
	
	public MainPageView() {
		Window.enableScrolling(false);
		Window.setMargin("0px");
		
		layout = new VLayout();
		layout.setWidth100();
		layout.setHeight100();
		
		HLayout topLayout = new HLayout();
		topLayout.setHeight(TOP_HEIGHT);
		
		HLayout menuLayout = new HLayout();
		menuLayout.setHeight(MENU_HEIGHT);
		
		HLayout mainLayout = new HLayout();
		HLayout bottomLayout = new HLayout();
		bottomLayout.setHeight(BOTTOM_HEIGHT);
		
		layout.addMember(topLayout);
		layout.addMember(menuLayout);
		layout.addMember(mainLayout);
		layout.addMember(bottomLayout);
	}
	
	@Override
	public Widget asWidget() {
		return layout;
	}
}
